package com.lnint.jess.generator.entity;

import javax.persistence.*;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.lnint.jess.common.persistence.IdEntity;

/**
 * <P>
 * 生成方案信息
 * </P>
 * 
 * @version 1.0
 * @author 严娜 2015-03-20 09:30:00
 * @since JDK 1.6
 */
@Entity
@Table(name = "gen_scheme")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class GenScheme extends IdEntity<GenScheme> {
	private static final long serialVersionUID = 1L;

	private String category;// 模版分类

	private String functionAuthor;// 生成功能作者

	private String functionName;// 生成功能名

	private String functionNameSimple;// 生成功能名（简写）
	
	private String moduleName;// 生成模块名

	private String name;// 方案名称

	private String packageName;// 生成包路径

	private String subModuleName;// 生成子模块名

	private GenScene genScene; // 场景

	private Boolean replaceFile; // 是否替换现有文件 0：不替换；1：替换文件
	
	private String flag;
	
	private String location;
	
    public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	@Transient
	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	public String getFunctionAuthor() {
		return functionAuthor;
	}

	public GenScheme() {
		super();
	}

	public GenScheme(String id) {
		this();
		this.id = id;
	}

	public String getCategory() {
		return this.category;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public void setFunctionAuthor(String functionAuthor) {
		this.functionAuthor = functionAuthor;
	}

	public String getFunctionName() {
		return this.functionName;
	}

	public void setFunctionName(String functionName) {
		this.functionName = functionName;
	}

	public String getFunctionNameSimple() {
		return this.functionNameSimple;
	}

	public void setFunctionNameSimple(String functionNameSimple) {
		this.functionNameSimple = functionNameSimple;
	}

	public String getModuleName() {
		return this.moduleName;
	}

	public void setModuleName(String moduleName) {
		this.moduleName = moduleName;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPackageName() {
		return this.packageName;
	}

	public void setPackageName(String packageName) {
		this.packageName = packageName;
	}

	public String getSubModuleName() {
		return this.subModuleName;
	}

	public void setSubModuleName(String subModuleName) {
		this.subModuleName = subModuleName;
	}

	@ManyToOne
	@JoinColumn(name = "gen_scene_id")
	@NotFound(action = NotFoundAction.IGNORE)
	public GenScene getGenScene() {
		return genScene;
	}

	public void setGenScene(GenScene genScene) {
		this.genScene = genScene;
	}

	public Boolean getReplaceFile() {
		return replaceFile;
	}

	public void setReplaceFile(Boolean replaceFile) {
		this.replaceFile = replaceFile;
	}
}